package com.yqya.jsonxml.controller;

import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.yqya.jsonxml.vo.CompanyVO;

/**
 * 测试示例
 *
 * @author Kevin
 * @date 2019-07-14
 */
@RestController
public class TestController {

    @RequestMapping(value = "/xml", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public CompanyVO xml() {
        CompanyVO vo = new CompanyVO("716105852", "阿里巴巴（中国）网络技术有限公司", "杭州");
        return vo;
    }

    @RequestMapping(value = "/json", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public CompanyVO json() {
        CompanyVO vo = new CompanyVO("716105852", "阿里巴巴（中国）网络技术有限公司", "杭州");
        return vo;
    }
}
